﻿@model Tippelde.Services.Dtos.TeamHeaderData
@{
    ViewBag.Title = "Csapat létrehozása";
    String actionName = ViewBag.ActionName;
}

<div class="row">
    <div class="col-md-6">
        <div class="well">
            @using (Html.BeginForm(actionName, "Team", FormMethod.Post, new { @class = "form-horizontal" }))
            {
                @Html.ValidationSummary();
                @Html.AntiForgeryToken();
                <fieldset>
                    <legend>Csapat @(actionName == "Edit" ? "módosítása" : "létrehozása")</legend>
                    <div class="form-group">
                        @Html.LabelFor(m => m.Name, new { @class = "col-lg-3 control-label" })
                        <div class="col-lg-9">
                            @Html.TextBoxFor(m => m.Name, new { @class = "form-control" })
                        </div>
                    </div>
                    <div class="form-group">
                        @Html.LabelFor(m => m.ShortName, new { @class = "col-lg-3 control-label" })
                        <div class="col-lg-9">
                            @Html.TextBoxFor(m => m.ShortName, new { @class = "form-control" })
                        </div>
                    </div>
                    <div class="form-group">
                        @Html.LabelFor(m => m.Description, new { @class = "col-lg-3 control-label" })
                        <div class="col-lg-9">
                            @Html.TextAreaFor(m => m.Description, new { @class = "form-control" })
                        </div>
                    </div>
                    <div class="form-group">
                        @Html.LabelFor(m => m.LogoUrl, new { @class = "col-lg-3 control-label" })
                        <div class="col-lg-9">
                            @Html.TextBoxFor(m => m.LogoUrl, new { @class = "form-control input-sm" })
                            <span class="help-block"><img class="col-md-8" src="" alt="" id="image-preview" /></span>
                        </div>
                    </div>

                    <div class="form-group">
                        @Html.LabelFor(m => m.IsNational, new { @class = "col-lg-3 control-label" })
                        <div class="col-lg-9">
                            @Html.CheckBoxFor(m => m.IsNational, new { @class = "form-control input-sm" })
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-lg-9 col-lg-offset-3">
                            <button type="submit" class="btn btn-primary">Mentés</button>
                        </div>
                    </div>
                </fieldset>
            }
        </div>
    </div>
</div>
@section scripts {

    @Scripts.Render("~/bundles/jqueryval")
    @Scripts.Render("~/bundles/tippelde-teameditor")
}